package com.liy.supercloud.ssoserver.controller;

import com.liy.framework.common.extvo.ResultVO;
import com.liy.supercloud.ssoserver.config.AuthKeyConfig;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping({"/auth/client"})
public class ClientController {

    @Autowired
    private AuthKeyConfig keyConfig;

    @ResponseBody
    @RequestMapping({"/userPubKey"})
    public ResultVO getServicePublicKey(String clientId, String secret) throws Exception {
        ResultVO resultVO = new ResultVO();
        resultVO.setData(this.keyConfig.getUserPubKey());
        return resultVO;
    }
}
